<template>
    <div>
        <divider>请先绑定您的手机号</divider>
        <group label-width="4.5em" label-margin-right="2em" label-align="right">
            <x-input  title="姓名" type="text" v-model="form.name"></x-input>
            <x-input  title="手机号" type="text" placeholder="必填" v-model="form.mobile"></x-input>
        </group>
        <x-button type="primary" action-type="button" @click.native="sumbitBindInfo()">提交</x-button>
    </div>
</template>
<script>
import { Group, XInput, XButton, Divider } from "vux";

export default {
  components: {
    Group,
    XInput,
    XButton,
    Divider
  },
  data() {
    return {
      form: {
        mobile: "",
        name: ""
      }
    };
  },
  methods: {
    sumbitBindInfo() {
        this.$http.post("/wechat/auth/bind",this.form).then(res=>{
            //绑定成功就跳转
          location.href=res.data.data
        })
    }
  }
};
</script>
